﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PDFConvExample._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="../App_Themes/Main/styles.css">
    <title>PDF Converter usage example</title>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <table width="800" align="center">
        <tr>
            <td class="frame">
                <div>
                    <div class="header">
                        &nbsp;1. Select file
                    </div>
                    <br />
                    File name:&nbsp;<asp:FileUpload ID="FileUpload1" runat="server" Width="700px" />
                    &nbsp;<!-- <asp:RegularExpressionValidator ID="FileUpLoadValidator" runat="server" ErrorMessage="Upload HTML documents only."
            ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$"
            ControlToValidate="FileUpload1">
        </asp:RegularExpressionValidator> --></div>
                <p>
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </p>
                <div class="header">
                    &nbsp;2. Set convert options
                </div>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Convert to" CssClass="caption"></asp:Label>
                            <asp:RadioButtonList ID="rblConvert" runat="server" RepeatColumns="2" Width="258px"
                                BackColor="#FFFFCC" BorderColor="#6699FF" BorderStyle="Solid" BorderWidth="1px">
                                <asp:ListItem>doc</asp:ListItem>
                                <asp:ListItem>html</asp:ListItem>
                                <asp:ListItem>xls</asp:ListItem>
                                <asp:ListItem Selected="True">pdf</asp:ListItem>
                                <asp:ListItem>jpeg</asp:ListItem>
                                <asp:ListItem>tiff</asp:ListItem>
                                <asp:ListItem>txt</asp:ListItem>
                                <asp:ListItem>emf</asp:ListItem>
                                <asp:ListItem>bmp</asp:ListItem>
                                <asp:ListItem>gif</asp:ListItem>
                                <asp:ListItem>png</asp:ListItem>
                                <asp:ListItem>eps</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td width="32">
                            &nbsp;
                        </td>
                        <td valign="top">
                            <asp:Label ID="Label4" runat="server" Text="Options" CssClass="caption"></asp:Label>
                            <table style="background-color: #FFFFCC; border: 1px solid #6699FF">
                                <tr>
                                    <td colspan="2">
                                        <asp:CheckBox ID="cbFitToPage" runat="server" Text="Fit to Page (-FP)" Checked="True" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label6" runat="server" Text="Page orientation:"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="cbPageOrientation" runat="server">
                                            <asp:ListItem>Portrait</asp:ListItem>
                                            <asp:ListItem>Landscape</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                       <asp:Label ID="Label7" runat="server" Text="Page size:"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="cbPageSize" runat="server">
                                            <asp:ListItem>Letter</asp:ListItem>
                                            <asp:ListItem Value="LetterSmall">Letter Small</asp:ListItem>
                                            <asp:ListItem>Tabloid</asp:ListItem>
                                            <asp:ListItem>Ledger</asp:ListItem>
                                            <asp:ListItem>Legal</asp:ListItem>
                                            <asp:ListItem>Statement</asp:ListItem>
                                            <asp:ListItem>Executive</asp:ListItem>
                                            <asp:ListItem>Folio</asp:ListItem>
                                            <asp:ListItem>A3</asp:ListItem>
                                            <asp:ListItem Selected="True">A4</asp:ListItem>
                                            <asp:ListItem Value="A4Small">A4 small</asp:ListItem>
                                            <asp:ListItem>A5</asp:ListItem>
                                            <asp:ListItem>B4</asp:ListItem>
                                            <asp:ListItem>B5</asp:ListItem>
                                            <asp:ListItem>Quarto</asp:ListItem>
                                            <asp:ListItem Value="EnvC5">Envelope C5</asp:ListItem>
                                            <asp:ListItem Value="EnvC3">Envelope C3</asp:ListItem>
                                            <asp:ListItem Value="EnvC4">Envelope C4</asp:ListItem>
                                            <asp:ListItem Value="EnvC6">Envelope C6</asp:ListItem>
                                            <asp:ListItem Value="EnvB4">Envelope B4</asp:ListItem>
                                            <asp:ListItem Value="EnvB5">Envelope B5</asp:ListItem>
                                            <asp:ListItem Value="EnvB6">Envelope B6</asp:ListItem>
                                            <asp:ListItem Value="EnvMonarch">Envelope Monarch</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table>
                                            <tr>
                                                <td valign="middle">
                                                    <asp:HyperLink ID="HyperLink1" runat="server" 
                                                        NavigateUrl="http://www.coolutils.com/CommandLine/TotalPDFConverter" 
                                                        Target="_blank">Additional</asp:HyperLink>
                                                </td>
                                                <td valign="middle">
                                                    <asp:TextBox ID="edAdditional" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <p>
                </p>
                <asp:Button ID="bnConvert" runat="server" OnClick="bnConvert_Click" Text="Upload &amp; Convert" />
            </td>
        </tr>
        <tr>
          <td>
            <table width="100%">
              <tr><td colspan=2>&nbsp;</td></tr>            
              <tr>
                <td>Registration key file:</td>
                <td><asp:FileUpload ID="edRegFile" runat="server" width="600px"/>
                    </td>
              </tr>
              <tr><td colspan=2>&nbsp;</td></tr>
              <tr><td>                
                <asp:Button ID="bnRegister" runat="server" OnClick="bnRegister_Click" Text="Register" /></td><td>
                  <asp:Label ID="lbRegisterStatus" runat="server" Text="Label" Visible="False"></asp:Label>
            </td></tr>
            </table>
          </td>
        </tr>
    </table>
    </form>
</body>
</html>
